def recursive_function(val):
    if val == 0: # Terminating condition
        print(val)
        return 0
    else:
        print(val)
        return val + recursive_function(val-1)

if __name__ == "__main__":
    recursive_function(10)